#ifndef constants_cpp
#define constants_cpp

#include <string>
#include <stdio.h>
#include "constants.h"
#include <iostream>
#include <boost/random/normal_distribution.hpp>
#include <boost/random/mersenne_twister.hpp>
#include <boost/random/variate_generator.hpp>

double pi;
float bad_point;
timeval start_time;

bool initialized = false;

void initialize_constants()
{
	if(!initialized)
	{
		gettimeofday(&start_time, NULL);
		pi = 3.141592653589793238462643383279502884197169399375105820974944;
		bad_point = std::numeric_limits<float>::quiet_NaN();
		initialized = true;
		printf("initialized constants\n");
		
		
	}
}

double get_time_now()
{
	timeval t, t2;
	gettimeofday(&t2, NULL);
	timersub(&t2, &start_time, &t);
	return t.tv_sec + t.tv_usec/1000000.0;
}

void printFloatMat(float ** mat, int w, int h)
{
	for(int i = 0; i < w; i++)
	{
		for(int j = 0; j < h;j++)
		{
			printf("%5.5f , ",mat[i][j]);
		}
		printf("\n");
	}
}
#endif
